-- GENERATED SPELL FOR [Cursed Mage] --


function spell0_8524(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(20829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8524', 1000, 1)
end

function spell1_8524(pUnit, Event) --@Tainted Mind,Self--
pUnit:FullCastSpellOnTarget(16567,pUnit)
pUnit:RegisterEvent('Sorts_8524', 584, 1)
end

function Sorts_8524(pUnit, Event)
local choix_sorts_8524 = math.random(0, 1)
if choix_sorts_8524 == 0 then
pUnit:RegisterEvent('spell0_8524', 1, 1)
end
if choix_sorts_8524 == 1 then
pUnit:RegisterEvent('spell1_8524', 1, 1)
end
end

function mob8524_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8524', math.random(1500, 3000), 1)
end

function mob8524_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8524_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8524_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8524, 1, 'mob8524_Action')
RegisterUnitEvent(8524, 2, 'mob8524_Leave')
RegisterUnitEvent(8524, 3, 'mob8524_Kill')
RegisterUnitEvent(8524, 4, 'mob8524_Die')
